package com.zjhb.common.util;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/*
 * 角色菜单，静态常量
 */
public class RoleMeun {
	// 管理员
	private final static List<Integer> gly = getGyl();

	// 超级管理员
	private final static List<Integer> cjgly = getCjGly();

	// 学校管理员
	private final static List<Integer> xxgly = getXxgly();

	// 老师
	private final static List<Integer> ls = getLs();

	// 学生
	private final static List<Integer> xs = getXs();
	
	// 学生
	public final static List<Integer> school = getSchool();
	//访客
	public final static List<Integer> fk = getfk();


	private static List<Integer> getGyl() {
		List<Integer> menuids = new ArrayList<Integer>();
		Integer [] menu={2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,22,23,24,25,26,27,28,29,30,31,35};
		menuids=Arrays.asList(menu);
		return menuids;
	}

	private static List<Integer> getfk() {
		List<Integer> menuids = new ArrayList<Integer>();
		Integer [] menu={25,26,27,28,29,30,31};
		menuids=Arrays.asList(menu);
		return menuids;
	}

	private static List<Integer> getSchool() {
		List<Integer> menuids = new ArrayList<Integer>();
		Integer [] menu={2,3,5,6,7,8,9,16,17,18,19,20,22,23};
		menuids=Arrays.asList(menu);
		return menuids;
	}

	private static List<Integer> getXs() {
		List<Integer> menuids = new ArrayList<Integer>();
		Integer [] menu={5,6,11,15,17,18,19,20,22,23,24,25,26,27,28,29,30,31,32,33,34,35};
		menuids=Arrays.asList(menu);
		return menuids;
	}

	private static List<Integer> getLs() {
		List<Integer> menuids = new ArrayList<Integer>();
		Integer [] menu={3,4,7,8,10,12,13,14,15,16,17,18,19,20,22,23,24,25,26,27,28,29,30,31,32,33,34,35};
		menuids=Arrays.asList(menu);
		return menuids;
	}

	private static List<Integer> getXxgly() {
		List<Integer> menuids = new ArrayList<Integer>();
		Integer [] menu={3,4,7,8,10,12,13,14,15,16,17,18,19,20,22,23,24,25,26,27,28,29,30,31,32,33,34,35};
		menuids=Arrays.asList(menu);
		return menuids;
	}

	private static List<Integer> getCjGly() {
		List<Integer> menuids = new ArrayList<Integer>();
		Integer [] menu={1,2};
		menuids=Arrays.asList(menu);
		return menuids;
	}

	public static List<Integer> getRole(String role) {
		if (("gly").equals(role)) {
			return gly;
		} else if (("cjgly").equals(role)) {
			return cjgly;
		} else if (("xxgly").equals(role)) {
			return xxgly;
		} else if (("ls").equals(role)) {
			return ls;
		} else if (("xs").equals(role)) {
			return xs;
		} else if (("fk").equals(role)) {
			return fk;
		}else{
			return null;
		}
	}
}
